import request from '@/utils/request'

export function getListPage(params) {
    return request({
        url: '/shoppingmall/helpPoor/listHelpPoorNum',
        headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        'pageNum': params.pageNum,
        'pageSize': params.pageSize
        },
        method: 'get',
        params:params
    })
}
export function delOperation(helpPoorId) {
    return request({
        url: '/shoppingmall/helpPoor/toEnd?helpPoorId='+helpPoorId,
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        method: 'GET',
    })
  }
  export function addDataList(data) {
    return request({
        url: '/shoppingmall/helpPoor/addHelpPoorNum',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        method: 'post',
        data
    })
  }
  export function updateDataList(data) {
    return request({
        url: '/shoppingmall/helpPoor/updateHelpPoor',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        method: 'post',
        data
    })
  }
  export function getDetails(params) {
    return request({
      url: '/shoppingmall/helpPoor/getHelpPoorProd?helpPoorId='+params.rowId,
      headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        'pageNum': params.pageNum,
        'pageSize': params.pageSize
      },
      method: 'get',
      params:params
    })
  }

  export function queryGoods(helpPoorId) {
    return request({
        url: '/shoppingmall/proInfo/queryProinfoGGById?id='+helpPoorId,
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        method: 'GET',
    })
  }
  
  export function addGoods(data) {
    return request({
        url: '/shoppingmall/helpPoor/addHelpPoorProd',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        method: 'post',
        data
    })
  }
  
  export function updateGoods(data) {
    return request({
        url: '/shoppingmall/helpPoor/updateHelpPoorProd',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        method: 'post',
        data
    })
  }
  export function isAdd(params) {
    return request({
        url: '/shoppingmall/helpPoor/judge',
        headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        },
        method: 'get',
        params:params
    })
}